<% include ../inc/header.ejs %>
<div class="container">
  <div class="col-md-8">
  <% catData.forEach(function(item){%>
  <div class="media">
    <div class="media-body">
      <a href="/article/single/<%=item.id%>"><h4 class="media-heading"><%=item.title%></h4></a>
      <span><%=item.post_time%> 作者 <%=item.author%></span>
    </div>
  </div>
  <%})%>
    <div class="page">
      <ul class="pager">
        <% if(parseInt(p)-1>0){%>
        <li class="previous"><a href="/article/lst/<%=cat_id%>/<%=parseInt(p)-1%>" >&larr; Prev</a></li>
        <%}
          if(parseInt(p)+1>parseInt(totalPage)){%>
        <li class="next"><a href="#">没有了!</a></li>
        <%}else{%>
        <li class="next"><a href="/article/lst/<%=cat_id%>/<%=parseInt(p)+1%>" >Next &rarr;</a></li>
        <%}%>
      </ul>
    </div>
  </div>
  <div class="col-md-4">
      <% include ../inc/right.ejs %>
  </div>
</div>
<% include ../inc/footer.ejs %>